<template>
 <div class='shadow'>
      <div class='box pr'>
    <i @click='sendData()'>x</i>
    <h3>添加一级菜单</h3>
    <div>
      <form action="">
        <el-input v-model="input" placeholder="请输入菜单名称"></el-input>
        <span>不超过8个字符</span>
      </form>
    </div>
    <div>
      <span>子菜单</span>
      <el-radio class="radio" v-model="radio" label="1">需要</el-radio>
      <el-radio class="radio" v-model="radio" label="2">不需要</el-radio>
    </div>
    <!--<div>
      <span>菜单动作</span>
      <el-radio class="radio" v-model="radio2" label="1">发送消息</el-radio>
      <el-radio class="radio" v-model="radio2" label="2">跳转网页</el-radio>
    </div>-->
  </div>
 </div>
</template>
<script>
  export default {
    //    props: ['ti'],
    data() {
      return {
        input: '',
        radio: '1',
        radio2: '1',
        flag: false,
      }
    },
    methods: {
      sendData: function () {
        //利用this.$emit()将hello传入给父组件
        this.$emit('send', this.flag);
      }

    },
  }

</script>
<style scpoed lang='less'>
  .box {
      margin: 200px auto;
    box-shadow: 0px 0px 13px 3px #888888;
    i {
      position: absolute;
      right: 6px;
      top: 5px;
      font-size: 16px;
      font-family: consolas;
      cursor: pointer;
    }
    width: 500px;
    height: 250px;
    background: #fff;
    padding: 20px;
    h3 {
      font-size: 16px;
      color: #000;
      margin-bottom: 20px;
    }
    form {
      .el-input {
        width: 150px;
      }
      input {
        width: 150px;
      }
      span {
        color: #969faa;
        margin-left: 15px;
      }
    }
    >div:nth-of-type(2) {
      margin-top: 20px;
      span {
        font-size: 16px;
        color: #000;
      }
    }
  }

</style>
